<template>
	<view>
		<view class="goshop-after-steps" v-if="afterData">
			售后记录
			<u-steps current="1" direction="column">
				<u-steps-item title="已下单" desc="10:30">
				</u-steps-item>
				<u-steps-item title="已出库" desc="10:35">
				</u-steps-item>
				<u-steps-item title="运输中" desc="11:40"></u-steps-item>
			</u-steps>
		</view>
		<view class="row-cen-cen u-p-20" v-if="afterData">
			<text>售后状态：待审核</text>
		</view>
		<!-- 卖家 -->
		<view v-if="mode === 1">
			<view class="row-x">
				<u-button type="success" text="同意"></u-button>
				<view style="width: 20rpx;"></view>
				<u-button type="warning" text="拒绝"></u-button>
			</view>
		</view>
		<view v-else>
			<u-button :text="submitText" @click="submitForm()" type="error" v-if="edit === 1"></u-button>
		</view>
	</view>
</template>

<script>
	export default {
		name:"goshop-after-operate",
		props: {
		  //0 买家 1 卖家
		  mode:{
			   type:Number,
			   default: 0
		  },
		  //0 查看 1 编辑
		  edit:{
			   type:Number,
			   default: 1
		  },
		  afterData: {
		  	type: Object,
		  	default: () => {
		  		return null;
		  	}
		  },
		},
		data() {
			return {
				submitText:'',
				afterStatusDict:{
					1:this.$t('after.inconsistent.text'),
					2:this.$t('after.inconsistent.text'),
					3:this.$t('after.inconsistent.text'),
					4:this.$t('after.inconsistent.text'),
					5:this.$t('after.inconsistent.text'),
					6:this.$t('after.inconsistent.text'),
					7:this.$t('after.inconsistent.text'),
					8:this.$t('after.inconsistent.text'),
					9:this.$t('after.inconsistent.text'),
					10:this.$t('after.inconsistent.text'),
					11:this.$t('after.inconsistent.text')
				},
			};
		},
		created() {
		  this.refresh();	
		},
		methods:{
			refresh(){
				this.submitText = this.$t('refunds.submit.text');
			},
			submitForm(){
				this.$emit("submit")
			}
		}
	}
</script>

<style lang="scss">
.goshop-after-steps{
	background-color: $goshop-color-auxiliary-one;
	padding: 20rpx;
	border-radius: 20rpx;
}
</style>